package com.chb.storm.trident;

import java.util.List;

import backtype.storm.tuple.Values;
import storm.trident.operation.TridentCollector;
import storm.trident.state.BaseQueryFunction;
import storm.trident.tuple.TridentTuple;

public class AdHBaseQuery extends BaseQueryFunction<AdHBaseState, List<Values>> {

	@Override
	public List<List<Values>> batchRetrieve(AdHBaseState hBaseState, List<TridentTuple> tridentTuples) {
		return hBaseState.batchRetrieve(tridentTuples);
	}

	@Override
	public void execute(TridentTuple tuples, List<Values> values, TridentCollector tridentCollector) {
		for (Values value : values) {
            tridentCollector.emit(value);
        }
	}
}
